blob: 4cc248bd422603b774cc443bd2e208b795caa6bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import { auth, post } from '$lib/utils';
import { error, json } from '@sveltejs/kit';
export async function POST({ cookies, request }) {
try {
return json(await post(`/user`, await request.json(), auth(cookies)));
} catch (e) {
console.log(e);
throw error(500, e.message);
}
}
|